package com.cl.short_video_java.web.client.shop;

import com.cl.short_video_java.common.Result;
import com.cl.short_video_java.pojo.VideoShop;
import com.cl.short_video_java.service.VideoShopService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author 付
 * @Date 2024-11-20 9:31
 * @Version 1.0
 * @description 前台商品接口
 * @since 1.0
 */
@RestController
@RequestMapping("/client/shop")
public class ClientShopController {

	private VideoShopService shopService;

	public ClientShopController(VideoShopService shopService) {
		this.shopService = shopService;
	}


	/**
	 * 获取会员商品
	 *
	 * @return
	 */
	@GetMapping("/vip/list")
	public Result getVipList() {
		List<VideoShop> list = shopService.getVipList();
		return Result.success(list);
	}

	/**
	 * 获取金币产品
	 *
	 * @return
	 */
	@GetMapping("/common/list")
	public Result getCommonList() {
		List<VideoShop> list = shopService.getCommonList();
		return Result.success(list);
	}
}
